
package main
import (
	"fmt"
)


func equal(x, y map[string]int) bool {
    if len(x) != len(y) {
        return false
    }
    for k, xv := range x {
        if yv, ok := y[k]; !ok {
        	fmt.Println(k, "键不存在")
            return false
        }else {
			if yv != xv {
				fmt.Println(k, "值不相等")
				return false
			}
			fmt.Println(k, "值OK")
        }
    }
    return true
}

func main() {
	xages := make(map[string] int)
	xages["zx"] = 35
	xages["hl"] = 29
	
	yages := map[string]int{
	    "zx": 35,
	    "hl": 29,
	}
	
	fmt.Println( equal(xages, yages) )


}


